package me.riverslob;

/**
 * 试试
 */
public class CommonTest {
    public static void main(String[] args) {
        String path="/upload/vehicle/crash/2013/05/20/VC201305201139090.jpg";
        String imageFile=path;
        if(imageFile.startsWith("upload")){
            imageFile=imageFile.substring("upload".length());
        }
        if(path.contains("/"))
            imageFile=path.substring(path.lastIndexOf("/")+1,path.length());
        System.out.println(imageFile);
    }

    /**
     *将毫秒级时间差转换成 *天*小时*分钟 格式
     * @param durationMillis
     * @return
     */
    public static String formatDateDuration(long durationMillis){
        long durationMinute=durationMillis / (1000*60);
        long days=durationMinute / (60 * 24);
        long dayMod=durationMinute % (60 * 24);
//        long hours=dayMod /

        return null;
    }

    public static String mkStr(String[] strArray){
        String result="";
        for(String str : strArray)
            result+=str;
        return result;
    }
}
